using System;
using System.Collections.Generic;
using System.Drawing;

using Clandestine.Base;

using Lime;

namespace Clandestine.Graphics
{
	public class DebugLine : Renderable
	{
		public Point Start;
		public Point End;
		
		public Color4 Color = Color4.Blue;
		public float Width = 1f;
		
		#region implemented abstract members of Clandestine.Graphics.Renderable
		protected override void render()
		{
			GL.Color4(Color.R, Color.G, Color.B, Color.A);
			GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
			
			GL.LineWidth(Width);
			
			GL.Begin(BeginMode.Lines);
			
			GL.Vertex2(Start.X, Start.Y);
			GL.Vertex2(End.X, End.Y);
			
			GL.End();
		}
		
		#endregion
		
		public DebugLine(RenderList rl, Point start, Point end) : base(rl)
		{
			Start = start;
			End = end;
		}
	}
}
